/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * agregarStock2.java
 *
 * Created on 27/10/2011, 23:54:42
 */

package Articulo;

import java.awt.event.ActionListener;
import java.awt.event.KeyListener;

/**
 *
 * @author nan
 */
public class agregarStockGUI extends javax.swing.JDialog {

    /** Creates new form agregarStock2 */
    public agregarStockGUI(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }


    public agregarStockGUI() {
        initComponents();
    }

    public void setActionListeners(ActionListener lis){
        this.getjButtonGuardar().addActionListener(lis);
        this.getjButtonCancelar().addActionListener(lis);
    }

    public void setKeyListener(KeyListener lis){
        this.getjTextFieldStockAgregar().addKeyListener(lis);
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabelCodigo = new javax.swing.JLabel();
        jLabelNombre = new javax.swing.JLabel();
        jLabelMarca = new javax.swing.JLabel();
        jLabelStockActual = new javax.swing.JLabel();
        jTextFieldStockAgregar = new javax.swing.JTextField();
        jButtonCancelar = new javax.swing.JButton();
        jButtonGuardar = new javax.swing.JButton();

        setTitle("Agregar Stock");

        jLabel1.setText("CODIGO:");

        jLabel2.setText("NOMBRE:");

        jLabel3.setText("MARCA:");

        jLabel4.setText("STOCK ACTUAL:");

        jLabel5.setText("STOCK A AGREGAR:");

        jLabelCodigo.setText("codigo");

        jLabelNombre.setText("nombre");

        jLabelMarca.setText("marca");

        jLabelStockActual.setText("stock");

        jButtonCancelar.setText("Cancelar");

        jButtonGuardar.setText("Guardar");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(32, 32, 32)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel1)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel4)))
                            .addGroup(layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jLabel5)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelCodigo)
                            .addComponent(jLabelNombre)
                            .addComponent(jLabelMarca)
                            .addComponent(jLabelStockActual)
                            .addComponent(jTextFieldStockAgregar, javax.swing.GroupLayout.DEFAULT_SIZE, 88, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jButtonCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(140, 140, 140))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabelCodigo)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelNombre)
                            .addComponent(jLabel2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelMarca)
                            .addComponent(jLabel3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelStockActual)
                            .addComponent(jLabel4)))
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jTextFieldStockAgregar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonCancelar)
                    .addComponent(jButtonGuardar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                agregarStockGUI dialog = new agregarStockGUI(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonCancelar;
    private javax.swing.JButton jButtonGuardar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabelCodigo;
    private javax.swing.JLabel jLabelMarca;
    private javax.swing.JLabel jLabelNombre;
    private javax.swing.JLabel jLabelStockActual;
    private javax.swing.JTextField jTextFieldStockAgregar;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the jButtonCancelar
     */
    public javax.swing.JButton getjButtonCancelar() {
        return jButtonCancelar;
    }

    /**
     * @return the jButtonGuardar
     */
    public javax.swing.JButton getjButtonGuardar() {
        return jButtonGuardar;
    }

    /**
     * @return the jLabelCodigo
     */
    public javax.swing.JLabel getjLabelCodigo() {
        return jLabelCodigo;
    }

    /**
     * @return the jLabelMarca
     */
    public javax.swing.JLabel getjLabelMarca() {
        return jLabelMarca;
    }

    /**
     * @return the jLabelNombre
     */
    public javax.swing.JLabel getjLabelNombre() {
        return jLabelNombre;
    }

    /**
     * @return the jLabelStockActual
     */
    public javax.swing.JLabel getjLabelStockActual() {
        return jLabelStockActual;
    }

    /**
     * @return the jTextFieldStockAgregar
     */
    public javax.swing.JTextField getjTextFieldStockAgregar() {
        return jTextFieldStockAgregar;
    }

}
